<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>webserver</title><style>
/* cspell:disable-file */
/* webkit printing magic: print all background colors */
html {
	-webkit-print-color-adjust: exact;
}
* {
	box-sizing: border-box;
	-webkit-print-color-adjust: exact;
}

html,
body {
	margin: 0;
	padding: 0;
}
@media only screen {
	body {
		margin: 2em auto;
		max-width: 900px;
		color: rgb(55, 53, 47);
	}
}

body {
	line-height: 1.5;
	white-space: pre-wrap;
}

a,
a.visited {
	color: inherit;
	text-decoration: underline;
}

.pdf-relative-link-path {
	font-size: 80%;
	color: #444;
}

h1,
h2,
h3 {
	letter-spacing: -0.01em;
	line-height: 1.2;
	font-weight: 600;
	margin-bottom: 0;
}

.page-title {
	font-size: 2.5rem;
	font-weight: 700;
	margin-top: 0;
	margin-bottom: 0.75em;
}

h1 {
	font-size: 1.875rem;
	margin-top: 1.875rem;
}

h2 {
	font-size: 1.5rem;
	margin-top: 1.5rem;
}

h3 {
	font-size: 1.25rem;
	margin-top: 1.25rem;
}

.source {
	border: 1px solid #ddd;
	border-radius: 3px;
	padding: 1.5em;
	word-break: break-all;
}

.callout {
	border-radius: 3px;
	padding: 1rem;
}

figure {
	margin: 1.25em 0;
	page-break-inside: avoid;
}

figcaption {
	opacity: 0.5;
	font-size: 85%;
	margin-top: 0.5em;
}

mark {
	background-color: transparent;
}

.indented {
	padding-left: 1.5em;
}

hr {
	background: transparent;
	display: block;
	width: 100%;
	height: 1px;
	visibility: visible;
	border: none;
	border-bottom: 1px solid rgba(55, 53, 47, 0.09);
}

img {
	max-width: 100%;
}

@media only print {
	img {
		max-height: 100vh;
		object-fit: contain;
	}
}

@page {
	margin: 1in;
}

.collection-content {
	font-size: 0.875rem;
}

.column-list {
	display: flex;
	justify-content: space-between;
}

.column {
	padding: 0 1em;
}

.column:first-child {
	padding-left: 0;
}

.column:last-child {
	padding-right: 0;
}

.table_of_contents-item {
	display: block;
	font-size: 0.875rem;
	line-height: 1.3;
	padding: 0.125rem;
}

.table_of_contents-indent-1 {
	margin-left: 1.5rem;
}

.table_of_contents-indent-2 {
	margin-left: 3rem;
}

.table_of_contents-indent-3 {
	margin-left: 4.5rem;
}

.table_of_contents-link {
	text-decoration: none;
	opacity: 0.7;
	border-bottom: 1px solid rgba(55, 53, 47, 0.18);
}

table,
th,
td {
	border: 1px solid rgba(55, 53, 47, 0.09);
	border-collapse: collapse;
}

table {
	border-left: none;
	border-right: none;
}

th,
td {
	font-weight: normal;
	padding: 0.25em 0.5em;
	line-height: 1.5;
	min-height: 1.5em;
	text-align: left;
}

th {
	color: rgba(55, 53, 47, 0.6);
}

ol,
ul {
	margin: 0;
	margin-block-start: 0.6em;
	margin-block-end: 0.6em;
}

li > ol:first-child,
li > ul:first-child {
	margin-block-start: 0.6em;
}

ul > li {
	list-style: disc;
}

ul.to-do-list {
	padding-inline-start: 0;
}

ul.to-do-list > li {
	list-style: none;
}

.to-do-children-checked {
	text-decoration: line-through;
	opacity: 0.375;
}

ul.toggle > li {
	list-style: none;
}

ul {
	padding-inline-start: 1.7em;
}

ul > li {
	padding-left: 0.1em;
}

ol {
	padding-inline-start: 1.6em;
}

ol > li {
	padding-left: 0.2em;
}

.mono ol {
	padding-inline-start: 2em;
}

.mono ol > li {
	text-indent: -0.4em;
}

.toggle {
	padding-inline-start: 0em;
	list-style-type: none;
}

/* Indent toggle children */
.toggle > li > details {
	padding-left: 1.7em;
}

.toggle > li > details > summary {
	margin-left: -1.1em;
}

.selected-value {
	display: inline-block;
	padding: 0 0.5em;
	background: rgba(206, 205, 202, 0.5);
	border-radius: 3px;
	margin-right: 0.5em;
	margin-top: 0.3em;
	margin-bottom: 0.3em;
	white-space: nowrap;
}

.collection-title {
	display: inline-block;
	margin-right: 1em;
}

.page-description {
    margin-bottom: 2em;
}

.simple-table {
	margin-top: 1em;
	font-size: 0.875rem;
	empty-cells: show;
}
.simple-table td {
	height: 29px;
	min-width: 120px;
}

.simple-table th {
	height: 29px;
	min-width: 120px;
}

.simple-table-header-color {
	background: rgb(247, 246, 243);
	color: black;
}
.simple-table-header {
	font-weight: 500;
}

time {
	opacity: 0.5;
}

.icon {
	display: inline-block;
	max-width: 1.2em;
	max-height: 1.2em;
	text-decoration: none;
	vertical-align: text-bottom;
	margin-right: 0.5em;
}

img.icon {
	border-radius: 3px;
}

.user-icon {
	width: 1.5em;
	height: 1.5em;
	border-radius: 100%;
	margin-right: 0.5rem;
}

.user-icon-inner {
	font-size: 0.8em;
}

.text-icon {
	border: 1px solid #000;
	text-align: center;
}

.page-cover-image {
	display: block;
	object-fit: cover;
	width: 100%;
	max-height: 30vh;
}

.page-header-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
}

.page-header-icon-with-cover {
	margin-top: -0.72em;
	margin-left: 0.07em;
}

.page-header-icon img {
	border-radius: 3px;
}

.link-to-page {
	margin: 1em 0;
	padding: 0;
	border: none;
	font-weight: 500;
}

p > .user {
	opacity: 0.5;
}

td > .user,
td > time {
	white-space: nowrap;
}

input[type="checkbox"] {
	transform: scale(1.5);
	margin-right: 0.6em;
	vertical-align: middle;
}

p {
	margin-top: 0.5em;
	margin-bottom: 0.5em;
}

.image {
	border: none;
	margin: 1.5em 0;
	padding: 0;
	border-radius: 0;
	text-align: center;
}

.code,
code {
	background: rgba(135, 131, 120, 0.15);
	border-radius: 3px;
	padding: 0.2em 0.4em;
	border-radius: 3px;
	font-size: 85%;
	tab-size: 2;
}

code {
	color: #eb5757;
}

.code {
	padding: 1.5em 1em;
}

.code-wrap {
	white-space: pre-wrap;
	word-break: break-all;
}

.code > code {
	background: none;
	padding: 0;
	font-size: 100%;
	color: inherit;
}

blockquote {
	font-size: 1.25em;
	margin: 1em 0;
	padding-left: 1em;
	border-left: 3px solid rgb(55, 53, 47);
}

.bookmark {
	text-decoration: none;
	max-height: 8em;
	padding: 0;
	display: flex;
	width: 100%;
	align-items: stretch;
}

.bookmark-title {
	font-size: 0.85em;
	overflow: hidden;
	text-overflow: ellipsis;
	height: 1.75em;
	white-space: nowrap;
}

.bookmark-text {
	display: flex;
	flex-direction: column;
}

.bookmark-info {
	flex: 4 1 180px;
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.bookmark-image {
	width: 33%;
	flex: 1 1 180px;
	display: block;
	position: relative;
	object-fit: cover;
	border-radius: 1px;
}

.bookmark-description {
	color: rgba(55, 53, 47, 0.6);
	font-size: 0.75em;
	overflow: hidden;
	max-height: 4.5em;
	word-break: break-word;
}

.bookmark-href {
	font-size: 0.75em;
	margin-top: 0.25em;
}

.sans { font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; }
.code { font-family: "SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace; }
.serif { font-family: Lyon-Text, Georgia, ui-serif, serif; }
.mono { font-family: iawriter-mono, Nitti, Menlo, Courier, monospace; }
.pdf .sans { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol", 'Twemoji', 'Noto Color Emoji', 'Noto Sans CJK JP'; }
.pdf:lang(zh-CN) .sans { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol", 'Twemoji', 'Noto Color Emoji', 'Noto Sans CJK SC'; }
.pdf:lang(zh-TW) .sans { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol", 'Twemoji', 'Noto Color Emoji', 'Noto Sans CJK TC'; }
.pdf:lang(ko-KR) .sans { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol", 'Twemoji', 'Noto Color Emoji', 'Noto Sans CJK KR'; }
.pdf .code { font-family: Source Code Pro, "SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace, 'Twemoji', 'Noto Color Emoji', 'Noto Sans Mono CJK JP'; }
.pdf:lang(zh-CN) .code { font-family: Source Code Pro, "SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace, 'Twemoji', 'Noto Color Emoji', 'Noto Sans Mono CJK SC'; }
.pdf:lang(zh-TW) .code { font-family: Source Code Pro, "SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace, 'Twemoji', 'Noto Color Emoji', 'Noto Sans Mono CJK TC'; }
.pdf:lang(ko-KR) .code { font-family: Source Code Pro, "SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace, 'Twemoji', 'Noto Color Emoji', 'Noto Sans Mono CJK KR'; }
.pdf .serif { font-family: PT Serif, Lyon-Text, Georgia, ui-serif, serif, 'Twemoji', 'Noto Color Emoji', 'Noto Serif CJK JP'; }
.pdf:lang(zh-CN) .serif { font-family: PT Serif, Lyon-Text, Georgia, ui-serif, serif, 'Twemoji', 'Noto Color Emoji', 'Noto Serif CJK SC'; }
.pdf:lang(zh-TW) .serif { font-family: PT Serif, Lyon-Text, Georgia, ui-serif, serif, 'Twemoji', 'Noto Color Emoji', 'Noto Serif CJK TC'; }
.pdf:lang(ko-KR) .serif { font-family: PT Serif, Lyon-Text, Georgia, ui-serif, serif, 'Twemoji', 'Noto Color Emoji', 'Noto Serif CJK KR'; }
.pdf .mono { font-family: PT Mono, iawriter-mono, Nitti, Menlo, Courier, monospace, 'Twemoji', 'Noto Color Emoji', 'Noto Sans Mono CJK JP'; }
.pdf:lang(zh-CN) .mono { font-family: PT Mono, iawriter-mono, Nitti, Menlo, Courier, monospace, 'Twemoji', 'Noto Color Emoji', 'Noto Sans Mono CJK SC'; }
.pdf:lang(zh-TW) .mono { font-family: PT Mono, iawriter-mono, Nitti, Menlo, Courier, monospace, 'Twemoji', 'Noto Color Emoji', 'Noto Sans Mono CJK TC'; }
.pdf:lang(ko-KR) .mono { font-family: PT Mono, iawriter-mono, Nitti, Menlo, Courier, monospace, 'Twemoji', 'Noto Color Emoji', 'Noto Sans Mono CJK KR'; }
.highlight-default {
	color: rgba(55, 53, 47, 1);
}
.highlight-gray {
	color: rgba(120, 119, 116, 1);
	fill: rgba(120, 119, 116, 1);
}
.highlight-brown {
	color: rgba(159, 107, 83, 1);
	fill: rgba(159, 107, 83, 1);
}
.highlight-orange {
	color: rgba(217, 115, 13, 1);
	fill: rgba(217, 115, 13, 1);
}
.highlight-yellow {
	color: rgba(203, 145, 47, 1);
	fill: rgba(203, 145, 47, 1);
}
.highlight-teal {
	color: rgba(68, 131, 97, 1);
	fill: rgba(68, 131, 97, 1);
}
.highlight-blue {
	color: rgba(51, 126, 169, 1);
	fill: rgba(51, 126, 169, 1);
}
.highlight-purple {
	color: rgba(144, 101, 176, 1);
	fill: rgba(144, 101, 176, 1);
}
.highlight-pink {
	color: rgba(193, 76, 138, 1);
	fill: rgba(193, 76, 138, 1);
}
.highlight-red {
	color: rgba(212, 76, 71, 1);
	fill: rgba(212, 76, 71, 1);
}
.highlight-gray_background {
	background: rgba(241, 241, 239, 1);
}
.highlight-brown_background {
	background: rgba(244, 238, 238, 1);
}
.highlight-orange_background {
	background: rgba(251, 236, 221, 1);
}
.highlight-yellow_background {
	background: rgba(251, 243, 219, 1);
}
.highlight-teal_background {
	background: rgba(237, 243, 236, 1);
}
.highlight-blue_background {
	background: rgba(231, 243, 248, 1);
}
.highlight-purple_background {
	background: rgba(244, 240, 247, 0.8);
}
.highlight-pink_background {
	background: rgba(249, 238, 243, 0.8);
}
.highlight-red_background {
	background: rgba(253, 235, 236, 1);
}
.block-color-default {
	color: inherit;
	fill: inherit;
}
.block-color-gray {
	color: rgba(120, 119, 116, 1);
	fill: rgba(120, 119, 116, 1);
}
.block-color-brown {
	color: rgba(159, 107, 83, 1);
	fill: rgba(159, 107, 83, 1);
}
.block-color-orange {
	color: rgba(217, 115, 13, 1);
	fill: rgba(217, 115, 13, 1);
}
.block-color-yellow {
	color: rgba(203, 145, 47, 1);
	fill: rgba(203, 145, 47, 1);
}
.block-color-teal {
	color: rgba(68, 131, 97, 1);
	fill: rgba(68, 131, 97, 1);
}
.block-color-blue {
	color: rgba(51, 126, 169, 1);
	fill: rgba(51, 126, 169, 1);
}
.block-color-purple {
	color: rgba(144, 101, 176, 1);
	fill: rgba(144, 101, 176, 1);
}
.block-color-pink {
	color: rgba(193, 76, 138, 1);
	fill: rgba(193, 76, 138, 1);
}
.block-color-red {
	color: rgba(212, 76, 71, 1);
	fill: rgba(212, 76, 71, 1);
}
.block-color-gray_background {
	background: rgba(241, 241, 239, 1);
}
.block-color-brown_background {
	background: rgba(244, 238, 238, 1);
}
.block-color-orange_background {
	background: rgba(251, 236, 221, 1);
}
.block-color-yellow_background {
	background: rgba(251, 243, 219, 1);
}
.block-color-teal_background {
	background: rgba(237, 243, 236, 1);
}
.block-color-blue_background {
	background: rgba(231, 243, 248, 1);
}
.block-color-purple_background {
	background: rgba(244, 240, 247, 0.8);
}
.block-color-pink_background {
	background: rgba(249, 238, 243, 0.8);
}
.block-color-red_background {
	background: rgba(253, 235, 236, 1);
}
.select-value-color-interactiveBlue { background-color: rgba(35, 131, 226, .07); }
.select-value-color-pink { background-color: rgba(245, 224, 233, 1); }
.select-value-color-purple { background-color: rgba(232, 222, 238, 1); }
.select-value-color-green { background-color: rgba(219, 237, 219, 1); }
.select-value-color-gray { background-color: rgba(227, 226, 224, 1); }
.select-value-color-translucentGray { background-color: rgba(255, 255, 255, 0.0375); }
.select-value-color-orange { background-color: rgba(250, 222, 201, 1); }
.select-value-color-brown { background-color: rgba(238, 224, 218, 1); }
.select-value-color-red { background-color: rgba(255, 226, 221, 1); }
.select-value-color-yellow { background-color: rgba(253, 236, 200, 1); }
.select-value-color-blue { background-color: rgba(211, 229, 239, 1); }
.select-value-color-pageGlass { background-color: undefined; }
.select-value-color-washGlass { background-color: undefined; }

.checkbox {
	display: inline-flex;
	vertical-align: text-bottom;
	width: 16;
	height: 16;
	background-size: 16px;
	margin-left: 2px;
	margin-right: 5px;
}

.checkbox-on {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%2358A9D7%22%2F%3E%0A%3Cpath%20d%3D%22M6.71429%2012.2852L14%204.9995L12.7143%203.71436L6.71429%209.71378L3.28571%206.2831L2%207.57092L6.71429%2012.2852Z%22%20fill%3D%22white%22%2F%3E%0A%3C%2Fsvg%3E");
}

.checkbox-off {
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20x%3D%220.75%22%20y%3D%220.75%22%20width%3D%2214.5%22%20height%3D%2214.5%22%20fill%3D%22white%22%20stroke%3D%22%2336352F%22%20stroke-width%3D%221.5%22%2F%3E%0A%3C%2Fsvg%3E");
}
	
</style></head><body><article id="73b01248-7ee5-4b04-9622-bec27e6c9fdd" class="page sans"><header><h1 class="page-title">webserver</h1><p class="page-description"></p></header><div class="page-body"><figure id="04f00dac-1359-45c3-98fc-ef2364a6b8db" class="link-to-page"><a href="webserver%2073b012487ee54b049622bec27e6c9fdd/%E6%96%B0%E7%9A%84%E7%90%86%E8%A7%A3%20%E5%87%BA%E7%8E%B0%E7%9A%84%E9%97%AE%E9%A2%98%2004f00dac135945c398fcef2364a6b8db.html">新的理解/出现的问题</a></figure><p id="408114b2-dce7-4a97-99a0-d1e42904f9ea" class="">
</p><p id="2fc4a92c-b845-4d54-b52a-ab96f7ab5309" class=""><a href="https://www.nowcoder.com/courses/cover/live/504">C++高薪面试项目_牛客网 (nowcoder.com)</a></p><figure id="ae0efadc-9a66-4603-9682-91f6581f664b" class="link-to-page"><a href="webserver%2073b012487ee54b049622bec27e6c9fdd/%E7%AC%AC1%E7%AB%A0%20Linux%E7%B3%BB%E7%BB%9F%E7%BC%96%E7%A8%8B%E5%85%A5%E9%97%A8%20ae0efadc9a664603968291f6581f664b.html">第1章 Linux系统编程入门</a></figure><figure id="e35efb6e-b2db-46fa-851e-47d29d1fd43e" class="link-to-page"><a href="webserver%2073b012487ee54b049622bec27e6c9fdd/%E7%AC%AC2%E7%AB%A0%20Linux%E5%A4%9A%E8%BF%9B%E7%A8%8B%E5%BC%80%E5%8F%91%20e35efb6eb2db46fa851e47d29d1fd43e.html">第2章 Linux多进程开发</a></figure><figure id="fe7f92f5-9c14-48e6-907b-ba85a6a4b82b" class="link-to-page"><a href="webserver%2073b012487ee54b049622bec27e6c9fdd/%E7%AC%AC3%E7%AB%A0%20Linux%E5%A4%9A%E7%BA%BF%E7%A8%8B%E5%BC%80%E5%8F%91%20fe7f92f59c1448e6907bba85a6a4b82b.html">第3章 Linux多线程开发</a></figure><figure id="124cb2cb-782b-4ba0-9b18-6513f52464c9" class="link-to-page"><a href="webserver%2073b012487ee54b049622bec27e6c9fdd/%E7%AC%AC4%E7%AB%A0%20Linux%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20124cb2cb782b4ba09b186513f52464c9.html">第4章 Linux网络编程</a></figure><figure id="f732b891-272e-4ccf-9522-19373dc106b9" class="link-to-page"><a href="webserver%2073b012487ee54b049622bec27e6c9fdd/%E7%AC%AC5%E7%AB%A0%20%E9%A1%B9%E7%9B%AE%E5%AE%9E%E6%88%98%E4%B8%8E%E6%80%BB%E7%BB%93%20f732b891272e4ccf952219373dc106b9.html">第5章 项目实战与总结</a></figure><p id="f44c73e3-6082-4b73-850e-dc7ec92f518c" class="">
</p><p id="c54c1f48-7405-43cc-8e52-1e5affea8cc8" class="">其他链接：</p><p id="a14e39df-1656-4312-b379-3f27946a80fa" class=""><a href="https://www.bilibili.com/video/BV1gg411P7hL/?spm_id_from=333.337.search-card.all.click&amp;vd_source=1389807f1f580114b04d85248174e5c3">【C语言/C++服务器开发】手把手带你实现高并发http服务器项目 + 网络编程完整源码分享 (毕业设计 | 课程设计 | 春招| 校招 | 考研必备)_哔哩哔哩_bilibili</a></p><p id="7e681339-e9df-462e-b242-3c62b5844aa1" class="">↑感觉很适合入门理解，对应的代码链接：</p><p id="bce0f4b5-21e7-4ad0-9ef9-97d8b8a1a45b" class=""><a href="https://mp.weixin.qq.com/s?__biz=Mzk0MzE5MTkzOA==&amp;mid=2247486985&amp;idx=1&amp;sn=b25e00598eb4a6e460f9850a3306478f&amp;chksm=c336ece4f44165f2a58b2c9a55584bbb079815614f76e39f5e7065685fd21a0bd5396f761014&amp;scene=178&amp;cur_album_id=1828517084830498816#rd">LinuxC/C++ 实现高并发http 服务器实践 (qq.com)</a></p><p id="7c8a6ead-8849-4138-9cd6-b32364e54e47" class="">
</p><p id="cda4e6bc-401a-4a27-92ba-f5dbb8401af3" class=""><a href="https://www.nowcoder.com/issue/tutorial?tutorialId=10069&amp;uuid=4d6c7e2ad88143b7bd44751310ddf53c">编程入门教程_名企面试真题面经_牛客网_牛客网 (nowcoder.com)</a></p><p id="038bac2e-8427-42ea-aed9-6a0e16bf9011" class=""><a href="https://www.nowcoder.com/tutorial/10003/e4f35e13b3464449a1c54922e6fdca30">C++教程_编程入门教程_牛客网 (nowcoder.com)</a></p><p id="a89960b6-adef-4628-b627-8f10c70acc44" class="">
</p><p id="2cfae897-6542-4316-92cd-6c3ce91d966e" class="">Linux轻量级高并发Web服务器开发</p><p id="d892ffd7-ba8f-439c-a025-1cce0ec04e6d" class="">项目描述:在 Linux 环境下使用 C++ 搭建轻量级高并发 Web 服务器，支持一定数量的客户端连接并及时响应主要工作:</p><p id="37416b48-972b-4951-b386-101b710aa967" class="">1、使用 Socket 实现不同主机之间的通信:</p><p id="b6e4e53e-07d2-4643-b8e7-d5b3178eebbf" class="">2、使用 Epoll 技术实现 I/O 多路复用，提高效率</p><p id="8604ac7d-f202-45ac-9ab4-ad3e1d3f317d" class="">3、使用线程池和模拟 Proactor 模式实现高并发处理:</p><p id="1dca7c67-13f3-4023-9032-d6514d888f22" class="">4、利用双向链表和定时器实现长连接检测与关闭，节省资源。</p><figure id="60fa5dca-d074-447e-b8b0-0b655ab8eba2" class="image"><a href="webserver%2073b012487ee54b049622bec27e6c9fdd/Untitled.png"><img style="width:522px" src="webserver%2073b012487ee54b049622bec27e6c9fdd/Untitled.png"/></a></figure><p id="2bdfe8c5-100b-423b-82bf-c848e6658aef" class="">
</p><figure id="13964619-b5dd-4310-8cf1-2f73dc505664" class="link-to-page"><a href="webserver%2073b012487ee54b049622bec27e6c9fdd/%E5%8D%95%E7%BA%BF%E7%A8%8B%2013964619b5dd43108cf12f73dc505664.html">单线程</a></figure><figure id="560beb8b-1f85-4eb6-b796-19feb16efe78" class="link-to-page"><a href="webserver%2073b012487ee54b049622bec27e6c9fdd/%E5%A4%9A%E7%BA%BF%E7%A8%8B%20560beb8b1f854eb6b79619feb16efe78.html">多线程</a></figure><figure id="3400767f-ae7f-41b3-98eb-2992a6a2bbe6" class="link-to-page"><a href="webserver%2073b012487ee54b049622bec27e6c9fdd/select%203400767fae7f41b398eb2992a6a2bbe6.html">select</a></figure><p id="84e79a22-45b0-4287-9115-4d3776e0b548" class="">本地运行这个code，代表开放了8888端口，在浏览器输入<a href="http://127.0.0.1:8888/">127.0.0.1:8888</a>即可访问</p><p id="4a78afd4-8348-4aab-bc0c-e1c40e60fa70" class="">注意recv的函数参数要调大，不然吃不完整个http请求</p><p id="43b93591-a4fe-4930-883c-523a3917bb93" class="">接下来返回请求头+请求体就能交给网页来解析html文本了</p><p id="25a3ca2b-811e-4489-a65a-fb027a7bc4fe" class=""><a href="https://blog.csdn.net/h593245631/article/details/94033451?ops_request_misc=&amp;request_id=&amp;biz_id=102&amp;utm_term=c++http%E6%9C%8D%E5%8A%A1%E5%99%A8&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~blog~sobaiduweb~default-6-94033451.nonecase&amp;spm=1018.2226.3001.4450">(62条消息) c++编写一个简单的Http服务器_c++创建http服务_空城新梦的博客-CSDN博客</a></p><p id="0a564b4c-0000-4d5a-af22-3c3a3005772c" class=""><a href="https://blog.csdn.net/merenguesl/article/details/119639967?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167898602716800211568951%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&amp;request_id=167898602716800211568951&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-119639967-null-null.142^v74^control,201^v4^add_ask,239^v2^insert_chatgpt&amp;utm_term=WORD%20sockVersion%20%3D%20MAKEWORD%282%2C%202%29%3B&amp;spm=1018.2226.3001.4187">(62条消息) （初学者的福音）windows下实现socket通信(TCP/IP)代码详解——服务端篇_merenguesl的博客-CSDN博客</a></p><p id="45b517bb-9d01-44e3-8f4b-7a1419e5e5f4" class=""><a href="https://mp.weixin.qq.com/s?__biz=Mzk0MzE5MTkzOA==&amp;mid=2247486985&amp;idx=1&amp;sn=b25e00598eb4a6e460f9850a3306478f&amp;chksm=c336ece4f44165f2a58b2c9a55584bbb079815614f76e39f5e7065685fd21a0bd5396f761014&amp;scene=178&amp;cur_album_id=1828517084830498816#rd">LinuxC/C++ 实现高并发http 服务器实践 (qq.com)</a></p><p id="54c42bc8-d33f-4094-8904-d82cf826533d" class=""><a href="https://www.bilibili.com/video/BV1gg411P7hL?p=15&amp;vd_source=1389807f1f580114b04d85248174e5c3">15_终结篇-实现并发访问的http 服务器_哔哩哔哩_bilibili</a></p><p id="4aa115f9-db58-4d95-9748-cce1d5a5be0c" class="">
</p><p id="90910369-bbd5-4359-876b-3283aa97f252" class=""><strong>linux:</strong></p><p id="61e8670d-c90b-42c7-8db1-65906f89ea45" class="">关闭linux防火墙，以便在windows就能通过浏览器访问：<a href="https://blog.csdn.net/qq_22256259/article/details/123934630?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167924395416800186532863%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&amp;request_id=167924395416800186532863&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_click~default-2-123934630-null-null.142^v74^control,201^v4^add_ask,239^v2^insert_chatgpt&amp;utm_term=%E5%85%B3%E9%97%ADlinux%E9%98%B2%E7%81%AB%E5%A2%99&amp;spm=1018.2226.3001.4187">(67条消息) Linux firewall(防火墙)相关命令_linux关闭防火墙_焱宣的博客-CSDN博客</a></p><p id="49c7ddd3-999a-430c-88ca-f28793cbbbfc" class=""><a href="https://blog.csdn.net/istrangeboy/article/details/112747366?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167924395416800186532863%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&amp;request_id=167924395416800186532863&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_positive~default-1-112747366-null-null.142^v74^control,201^v4^add_ask,239^v2^insert_chatgpt&amp;utm_term=%E5%85%B3%E9%97%ADlinux%E9%98%B2%E7%81%AB%E5%A2%99&amp;spm=1018.2226.3001.4187">(67条消息) Linux系统如何关闭防火墙【linux系统防火墙】_linux stop firewall_istrangeboy的博客-CSDN博客</a></p><p id="942e1780-ba5d-482b-83ca-5d0834b79b14" class="">编译不能：<a href="https://blog.csdn.net/Sunnyside_/article/details/118695121?ops_request_misc=&amp;request_id=&amp;biz_id=102&amp;utm_term=error:%20%E2%80%98for%E2%80%99%20loop%20initial%20decl&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-1-118695121.142^v74^control,201^v4^add_ask,239^v2^insert_chatgpt&amp;spm=1018.2226.3001.4187">(67条消息) 【经验分享】Error:‘for’ loop initial declarations are only allowed in C99 mode 的解决方案_一条余弦Cos的博客-CSDN博客</a></p><p id="ae899c9c-ca0f-47ad-8fd0-5993cdde34e8" class="">
</p><p id="ab68ce43-c565-4072-8bfa-ba2f826ee288" class=""><strong>报错：</strong></p><p id="f31ad0a5-37da-4b09-80ea-09ac3892dc37" class="">不要using namespace std</p><p id="8df6c2cf-b379-4065-a23e-095e41fb5b29" class=""><a href="https://blog.csdn.net/anifans9350/article/details/81517125?ops_request_misc=&amp;request_id=&amp;biz_id=102&amp;utm_term=c++socket%E7%9A%84connect%E7%BB%8F%E5%B8%B8%E5%A4%B1%E8%B4%A5&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-0-81517125.142^v74^control,201^v4^add_ask,239^v2^insert_chatgpt&amp;spm=1018.2226.3001.4187">(65条消息) C++ TCP socket编程中的小陷阱（服务端accept 不阻塞 和 客户端connect 重连失败）_c++ socket connect失败_兴趣使然的码畜的博客-CSDN博客</a></p><p id="1406cd4c-5151-4a93-b29d-892b60ab5378" class="">bzero</p><p id="fa4cf00a-e980-4300-8ea7-0c1da6a0fd2f" class=""><a href="https://blog.csdn.net/qq_40967086/article/details/128491701?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167904542816800226573019%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&amp;request_id=167904542816800226573019&amp;biz_id=&amp;utm_medium=distribute.pc_search_result.none-task-code-2~all~first_rank_ecpm_v1~rank_v31_ecpm-2-128491701-1-null-null.142^v74^control,201^v4^add_ask,239^v2^insert_chatgpt&amp;utm_term=%5BError%5D%20bzero%20was%20not%20declared%20in%20this%20scope">(65条消息) Windows网络编程 c语言 报错：[Error] ‘bzero‘ was not declared in this scope_一只菜得不行的鸟的博客-CSDN博客</a></p><p id="c9b48b40-a061-46e4-9084-989918bed8d6" class="">socket_t</p><p id="d1581af8-12b0-4e36-b210-b085f2103395" class=""><a href="https://blog.csdn.net/H674199469/article/details/125045520?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167904547216800182153503%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&amp;request_id=167904547216800182153503&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-125045520-null-null.142^v74^control,201^v4^add_ask,239^v2^insert_chatgpt&amp;utm_term=socklen_t%E6%98%AF%E5%93%AA%E4%B8%AA%E6%96%87%E4%BB%B6&amp;spm=1018.2226.3001.4187">(65条消息) socklen_t在windows和linux平台下的头文件定义_socklen_t头文件_长腿O叔叔的博客-CSDN博客</a></p><p id="2d259104-2b44-46f9-8037-d4eed8dee2f0" class="">
</p></div></article></body></html>